﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kunlun.Models;

namespace Kunlun.BusinessLogic
{
 public partial  class KunlunAddress
    {
     KunLunEntities entities = new KunLunEntities();
     public bool DeleteAddress(int id)
     {
         try
         {
             var address = entities.Address.Single(a => a.AddressID == id);
             entities.Address.Remove(address);
             entities.SaveChanges();

             return true;
         }
         catch
         {
             return false;
         }

     }
    }
}
